package Demo;

public class Demo5 {//单例模式

    public static void main(String[] args) {
        sigleTon s = sigleTon.getInstance();
        System.out.println(s);
    }

}

class sigleTon {
    private sigleTon() {
    }

    private static sigleTon s = new sigleTon();

    public static sigleTon getInstance() {
        return s;
    }
}